home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / Think C QuickTime Interfaces / TC QuickTime.sit / TC QuickTime / Video.h < prev   
Text File  |  1994-03-22  |  7KB  |  188 lines

  1. /*
  2.     File:        Video.h
  3.  
  4.     Copyright:    ⌐ 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. */
  11.  
  12. #pragma once
  13.  
  14. #ifndef __VIDEO__
  15. #define __VIDEO__
  16.  
  17. #ifndef __QUICKDRAW__
  18. #include <Quickdraw.h>
  19. #endif
  20.  
  21.  
  22. enum {
  23.  
  24.     mBaseOffset = 1,            /*Id of mBaseOffset.*/
  25.     mRowBytes = 2,              /*Video sResource parameter Id's */
  26.     mBounds = 3,                /*Video sResource parameter Id's */
  27.     mVersion = 4,               /*Video sResource parameter Id's */
  28.     mHRes = 5,                  /*Video sResource parameter Id's */
  29.     mVRes = 6,                  /*Video sResource parameter Id's */
  30.     mPixelType = 7,             /*Video sResource parameter Id's */
  31.     mPixelSize = 8,             /*Video sResource parameter Id's */
  32.     mCmpCount = 9,              /*Video sResource parameter Id's */
  33.     mCmpSize = 10,              /*Video sResource parameter Id's */
  34.     mPlaneBytes = 11,           /*Video sResource parameter Id's */
  35.     mVertRefRate = 14,          /*Video sResource parameter Id's */
  36.     mVidParams = 1,             /*Video parameter block id.*/
  37.     mTable = 2,                 /*Offset to the table.*/
  38.     mPageCnt = 3,               /*Number of pages*/
  39.     mDevType = 4,               /*Device Type*/
  40.  
  41.     oneBitMode = 128,           /*Id of OneBitMode Parameter list.*/
  42.     twoBitMode = 129,           /*Id of TwoBitMode Parameter list.*/
  43.     fourBitMode = 130,          /*Id of FourBitMode Parameter list.*/
  44.     eightBitMode = 131          /*Id of EightBitMode Parameter list.*/
  45. };
  46. enum {
  47.     sixteenBitMode = 132,       /*Id of SixteenBitMode Parameter list.*/
  48.     thirtyTwoBitMode = 133,     /*Id of ThirtyTwoBitMode Parameter list.*/
  49.  
  50.     firstVidMode = 128,         /*The new, better way to do the above.    */
  51.     secondVidMode = 129,        /*    QuickDraw only supports six video    */
  52.     thirdVidMode = 130,         /*    at this time.                        */
  53.     fourthVidMode = 131,
  54.     fifthVidMode = 132,
  55.     sixthVidMode = 133,
  56.  
  57.     spGammaDir = 64,
  58.     spVidNamesDir = 65,
  59.  
  60. /* Control Codes */
  61.     cscReset = 0,
  62.     cscKillIO = 1,
  63.     cscSetMode = 2,
  64.     cscSetEntries = 3,
  65.     cscSetGamma = 4,
  66.     cscGrayPage = 5,
  67.     cscGrayScreen = 5,
  68.     cscSetGray = 6,
  69.     cscSetInterrupt = 7,
  70.     cscDirectSetEntries = 8
  71. };
  72. enum {
  73.     cscSetDefaultMode = 9,
  74.  
  75. /* Status Codes */
  76.     cscGetMode = 2,
  77.     cscGetEntries = 3,
  78.     cscGetPageCnt = 4,
  79.     cscGetPages = 4,            /* This is what C&D 2 calls it. */
  80.     cscGetPageBase = 5,
  81.     cscGetBaseAddr = 5,         /* This is what C&D 2 calls it. */
  82.     cscGetGray = 6,
  83.     cscGetInterrupt = 7,
  84.     cscGetGamma = 8,
  85.     cscGetDefaultMode = 9
  86. };
  87.  
  88. struct VPBlock {
  89.     long vpBaseOffset;          /*Offset to page zero of video RAM (From minorBaseOS).*/
  90.     short vpRowBytes;           /*Width of each row of video memory.*/
  91.     Rect vpBounds;              /*BoundsRect for the video display (gives dimensions).*/
  92.     short vpVersion;            /*PixelMap version number.*/
  93.     short vpPackType;
  94.     long vpPackSize;
  95.     long vpHRes;                /*Horizontal resolution of the device (pixels per inch).*/
  96.     long vpVRes;                /*Vertical resolution of the device (pixels per inch).*/
  97.     short vpPixelType;          /*Defines the pixel type.*/
  98.     short vpPixelSize;          /*Number of bits in pixel.*/
  99.     short vpCmpCount;           /*Number of components in pixel.*/
  100.     short vpCmpSize;            /*Number of bits per component*/
  101.     long vpPlaneBytes;          /*Offset from one plane to the next.*/
  102. };
  103.  
  104. typedef struct VPBlock VPBlock;
  105. typedef VPBlock *VPBlockPtr;
  106.  
  107. struct VDEntryRecord {
  108.     Ptr csTable;                /*(long) pointer to color table entry=value, r,g,b:INTEGER*/
  109. };
  110.  
  111. typedef struct VDEntryRecord VDEntryRecord;
  112. typedef VDEntryRecord *VDEntRecPtr;
  113.  
  114. /* Parm block for SetGray control call */
  115. struct VDGrayRecord {
  116.     Boolean csMode;             /*Same as GDDevType value (0=mono, 1=color)*/
  117. };
  118.  
  119. typedef struct VDGrayRecord VDGrayRecord;
  120. typedef VDGrayRecord *VDGrayPtr;
  121.  
  122. /* Parm block for SetEntries control call */
  123. struct VDSetEntryRecord {
  124.     ColorSpec *csTable;         /*Pointer to an array of color specs*/
  125.     short csStart;              /*Which spec in array to start with, or -1*/
  126.     short csCount;              /*Number of color spec entries to set*/
  127. };
  128.  
  129. typedef struct VDSetEntryRecord VDSetEntryRecord;
  130. typedef VDSetEntryRecord *VDSetEntryPtr;
  131.  
  132. /* Parm block for SetGamma control call */
  133. struct VDGammaRecord {
  134.     Ptr csGTable;               /*pointer to gamma table*/
  135. };
  136.  
  137. typedef struct VDGammaRecord VDGammaRecord;
  138. typedef VDGammaRecord *VDGamRecPtr;
  139.  
  140. struct VDPageInfo {
  141.     short csMode;               /*(word) mode within device*/
  142.     long csData;                /*(long) data supplied by driver*/
  143.     short csPage;               /*(word) page to switch in*/
  144.     Ptr csBaseAddr;             /*(long) base address of page*/
  145. };
  146.  
  147. typedef struct VDPageInfo VDPageInfo;
  148. typedef VDPageInfo *VDPgInfoPtr;
  149.  
  150. struct VDSizeInfo {
  151.     short csHSize;              /*(word) desired/returned h size*/
  152.     short csHPos;               /*(word) desired/returned h position*/
  153.     short csVSize;              /*(word) desired/returned v size*/
  154.     short csVPos;               /*(word) desired/returned v position*/
  155. };
  156.  
  157. typedef struct VDSizeInfo VDSizeInfo;
  158. typedef VDSizeInfo *VDSzInfoPtr;
  159.  
  160. struct VDSettings {
  161.     short csParamCnt;           /*(word) number of params*/
  162.     short csBrightMax;          /*(word) max brightness*/
  163.     short csBrightDef;          /*(word) default brightness*/
  164.     short csBrightVal;          /*(word) current brightness*/
  165.     short csCntrstMax;          /*(word) max contrast*/
  166.     short csCntrstDef;          /*(word) default contrast*/
  167.     short csCntrstVal;          /*(word) current contrast*/
  168.     short csTintMax;            /*(word) max tint*/
  169.     short csTintDef;            /*(word) default tint*/
  170.     short csTintVal;            /*(word) current tint*/
  171.     short csHueMax;             /*(word) max hue*/
  172.     short csHueDef;             /*(word) default hue*/
  173.     short csHueVal;             /*(word) current hue*/
  174.     short csHorizDef;           /*(word) default horizontal*/
  175.     short csHorizVal;           /*(word) current horizontal*/
  176.     short csHorizMax;           /*(word) max horizontal*/
  177.     short csVertDef;            /*(word) default vertical*/
  178.     short csVertVal;            /*(word) current vertical*/
  179.     short csVertMax;            /*(word) max vertical*/
  180. };
  181.  
  182. typedef struct VDSettings VDSettings;
  183. typedef VDSettings *VDSettingsPtr;
  184.  
  185.  
  186.  
  187. #endif
  188.